#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:homework2_3.py
# author:wmf
# datetime:2021/4/4 20:55
# software: PyCharm
'''
this is function description
'''
# import module your need

#3  编写一个函数, 传入一个数字列表, 输出列表中的奇数;
#   数字列表请用随机数函数生成;

from random import randint

def GetOdd(list1):
    for num in list1:
        if(num%2 == 1):
            print(num,end=' ')
    print()

list1 = [randint(1,100) for _ in range(10)]

print("数字列表中的值如下:")
for num in list1:
    print(num,end=" ")

print()
print("其中奇数有:")
GetOdd(list1)